#include <iostream>
#include <stdio.h>
#include <string>

using namespace std;

int main(int argc, char* argv[])
{
	int hours = 0;
	int minutes = 0;
	int seconds = 0;	

	char labelEndings[3]= {'\0', 	//hours
						 '\0',	//minutes
						 '\0',	//seconds
				};

	int totalSeconds = 0;
	
	cout << "Enter the hours: ";
	cin >> hours;
	cout << endl;

	cout << "Enter the minutes: ";
	cin >> minutes;
	cout << endl;

	cout << "Enter the seconds: ";
	cin >> seconds;
	cout << endl;	
	
	totalSeconds = hours * 60 * 60
					 + minutes * 60
					 + seconds;

	if (hours != 1)
	{
		labelEndings[0] = 's';
	}
	if (minutes != 1)
	{
		labelEndings[1] = 's';		
	}	
	if (seconds != 1)
	{
		labelEndings[2] = 's';
	}

	printf("There are %d seconds in %d hour%c, %d minute%c, and %d second%c.\n", totalSeconds, hours, labelEndings[0], minutes, labelEndings[1], seconds, labelEndings[2]);  

	#ifdef _WIN32
	system("pause");
	#endif


	return 0;
 }
